<?php
	$groupid = checkUserGroup($_SESSION['username']);
	$members = getMembers($groupid);
	$membercount = 0;
	
	echo "<p>Please select group members from the following list to assign to this chore:</p>";
	
	echo "<form name=\"choreDistro\" id=\"choreDistro\" method=\"post\" action=\"?addbill&billtype&share&complete\">";
	echo "<table>
			<tr>
				<td><p><strong>Member</strong></p></td>
				<td><p><strong>Assign Chore</strong></p></td>
			</tr>";
	while ($row = mysql_fetch_array($members)) {
		$membercount = $membercount + 1;
		echo "<tr>
				<td><p>" . $row[1] . " " . $row[2] . "</p></td>
				<td><input type=\"checkbox\" name=\"member[]\" value=\"" . $row[0] . "\" /></td>
			</tr>";
	}
	echo '</table>';
	echo '<input type="hidden" name="billName" value="' . $_POST['billName'] . '">';
	echo '<input type="hidden" name="billType" value="' . $_POST['billType'] . '">';
	echo '<input type="hidden" name="dueDate" value="' . $_POST['dueDate'] . '">';
	echo '<input type="submit" value="Continue">';
	echo '</form>';
?>